@layout("/common/_curd/_container.html"){

<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
		initMenuBtn("btns", "${code}");
	});
	
	function initGrid(){
		var grid_url = ctx + "/${code}/list";
		var _colnames = ["", 
						"产品", 
						"工艺", 
						"起价", 
						"起价数量", 
						"续价"
		];
		var _colmodel = [{name:"id", index:"id", hidden:true,width:100},
						{name:"pname", index:"pname", width:100},
						{name:"name", index:"name", width:100},
						{name:"f_prise", index:"f_prise", width:100},
						{name:"f_num", index:"f_num", width:100},
						{name:"l_prise", index:"l_prise", width:100}
		];
		
		jQuery(grid_selector).jqGrid({
			url : grid_url,
		    shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel, 
			jsonReader : {id :"id"},
			pager : pager_selector,
			postData : {sort : "id",
                where:"{p_id:'${pid!}'}",
				order : "desc"}
		});
	}
</script>

<input type="hidden" id="pid" value="${pid!}">

	<!-- 配置 grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<div class="welljq well-sm" id="btns"></div>
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页-->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入所需的js -->
	@include("/common/_listscript.html"){}
	
@}	